import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      redirect:'/login'
    },
    {
      path: '/login',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/login.vue')
    },
    {
      path:'/addtype',
      component:()=>import('../views/addtype.vue')
    },
    {
      path:'/showtype',
      component:()=>import('../views/showtype.vue')
    },
    {
      path:'/addnum',
      component:()=>import('../views/addnum.vue')
    },
    {
      path:'/shownum',
      component:()=>import('../views/shownum.vue')
    },
    {
      path:'/updnum',
      component:()=>import('../views/updnum.vue') 
    },
    {
      path:'/showorder',
      component:()=>import('../views/showorder.vue')
    }
  ]
})

export default router
